﻿using QG.FrontDesk.BLL.IService;
using QG.FrontDesk.DAL.IRepository;
using QG.FrontDesk.Model;
using System.Collections.Generic;

namespace QG.FrontDesk.BLL.Service
{
    public class ResumeService: IResumeService
    {
        private IResumeRepository _resumeRepository;
        public ResumeService(IResumeRepository jianliRepository)
        {
            this._resumeRepository = jianliRepository;
        }

        /// <summary>
        /// 期望工作——获取期望城市
        /// </summary>
        /// <returns></returns>
        public List<Cityinfo> GetCityinfos()
        {
            return _resumeRepository.GetCityinfos();
        }

        /// <summary>
        /// 获取简历信息
        /// </summary>
        /// <param name="rid"></param>
        /// <returns></returns>
        public ResumeInfo GetResumeInfo(int rid)
        {
            return _resumeRepository.GetResumeInfo(rid);
        }

        /// <summary>
        /// 修改“用户信息表”
        /// </summary>
        /// <param name="userInfo"></param>
        /// <returns></returns>
        public int UpdateUserInfo(UserInfo userInfo)
        {
            return _resumeRepository.UpdateUserInfo(userInfo);
        }

        /// <summary>
        /// 修改“期望工作表”
        /// </summary>
        /// <param name="expecttoWork"></param>
        /// <returns></returns>
        public int UpdateExpectToWork(ExpecttoWork expecttoWork)
        {
            return _resumeRepository.UpdateExpectToWork(expecttoWork);
        }

        /// <summary>
        /// 修改“工作经历表”
        /// </summary>
        /// <param name="businessexperien"></param>
        /// <returns></returns>
        public int UpdateBusinessexperien(Businessexperien businessexperien)
        {
            return _resumeRepository.UpdateBusinessexperien(businessexperien);
        }

        /// <summary>
        /// 修改“项目经验表”
        /// </summary>
        /// <param name="projectExperien"></param>
        /// <returns></returns>
        public int UpdateProjectExperien(ProjectExperien projectExperien)
        {
            return _resumeRepository.UpdateProjectExperien(projectExperien);
        }

        /// <summary>
        /// 修改“教育背景表”
        /// </summary>
        /// <param name="educational"></param>
        /// <returns></returns>
        public int UpdateEducation(Educational educational)
        {
            return _resumeRepository.UpdateEducation(educational);
        }

        /// <summary>
        /// 修改“作品展示表”
        /// </summary>
        /// <param name="worksShow">作品展示表</param>
        /// <returns></returns>
        public int UpdateWorksShow(WorksShow worksShow)
        {
            return _resumeRepository.UpdateWorksShow(worksShow);
        }

        /// <summary>
        /// 根据id 查询工作经历表
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Businessexperien GetBusinessexperien(int id)
        {
            return _resumeRepository.GetBusinessexperien(id);
        }

        /// <summary>
        /// 新增简历附件（文件上传）
        /// </summary>
        /// <param name="resumeInfo"></param>
        /// <returns></returns>
        public int AddResumePath(ResumeInfo resumeInfo)
        {
            return _resumeRepository.AddResumePath(resumeInfo);
        }
        /// <summary>
        /// 得到所有简历信息
        /// </summary>
        /// <returns></returns>
        public List<ResumeInfo> GetResumeInfos()
        {
            return _resumeRepository.GetResumeInfos();
        }
    }
}
